<?php session_start(); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php include("db.php"); 	// Connect to the database server
dbConnect('kar_web1');   	// Use function in db.php to connect
include_once("http://02d2e0a.netsolhost.com/includes/timeout.php");?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Kalamazoo Animal Rescue</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<?php include("http://02d2e0a.netsolhost.com/includes/head.inc");  ?>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
</head>
<div id="bodywidth">
<?php include("http://02d2e0a.netsolhost.com/includes/header.inc");  ?>
<p align="center">&nbsp;</p>
<p align="center">&nbsp;</p>
<p align="center">&nbsp;</p>
<?php include("http://02d2e0a.netsolhost.com/includes/leftmenu.inc");
if (!isset($_SESSION['name']))
{ ?>
<div id="centercontent" style="width: 475px; height: auto">
<form method="GET" action="confirmlogin.php">
<table height="300px" width="100%" border=0 >
	<td align= center valign="top">
		<table height="300px" width="100%" border=0>
			<td align="center">
				<table width="100%" border=0>
				<td align="center">
				<font size=6>KAR Volunteer and Admin Login</font>
				</td>
			</td>
		</table>

		<br>

		<table width="400px" cellpadding="5%" border="0">
		<tr>
			<td align=right><font size=3><b>User Name:</b></font></td /align>
			<td><input type="text" name="user" size="20"></td>
		</tr>
		<tr>
			<td align=right><font size=3><b>Password:</b></td /align>
			<td><input type="password" name="password" size="20"></td>
		</tr>
		</table>

		<table width="100%" border="0">
		<tr>
			<td align=center><input type="submit" value="Login">
			
		</tr>
		</table>
	</td>
</table>
</div>
<? include("http://02d2e0a.netsolhost.com/includes/footer.inc");  ?>
</div>
</body>
</html>
<?php 
}
elseif ((isset($_SESSION['name']) && ($_SESSION['board']!='y')) || (isset($_SESSION['name']) && ($_SESSION['webteam']!='y')))
{ ?>
<div id="centercontent" style="width: 475px; height: auto">
You do not have sufficient privilages to access this page.
</div>
<? include("http://02d2e0a.netsolhost.com/includes/footer.inc");  ?>
</div>
</div>
</body>
</html>
<?
}
else
{ ?>
<div id="centercontent" style="width: 475px; height: auto">
<?php 

	$volunteer_id = mysql_real_escape_string($_POST["volunteer_id"]);	
	$name = mysql_real_escape_string($_POST["name"]);
	$address = mysql_real_escape_string($_POST["address"]);
	$email = mysql_real_escape_string($_POST["email"]);
	$phone1 = mysql_real_escape_string($_POST["phone1"]);
	$phone2 = mysql_real_escape_string($_POST["phone2"]);
	$active = mysql_real_escape_string($_POST["active"]);
	$picture = mysql_real_escape_string($_POST["picture"]);
	$login = mysql_real_escape_string($_POST["login"]);
	$cat_foster = mysql_real_escape_string($_POST["cat_foster"]);
	$dog_foster = mysql_real_escape_string($_POST["dog_foster"]);
	$cat_screener = mysql_real_escape_string($_POST["cat_screener"]);
	$dog_screener = mysql_real_escape_string($_POST["dog_screener"]);
	$webteam = mysql_real_escape_string($_POST["webteam"]);
	$board = mysql_real_escape_string($_POST["board"]);

	mysql_query("UPDATE volunteers SET name='$name', address='$address', email='$email', phone1='$phone1', phone2='$phone2', active='$active', picture='$picture', login='$login', cat_foster='$cat_foster', dog_foster='$dog_foster'" .
	"cat_screener='$cat_screener', dog_screener='$dog_screener', webteam='$webteam', board='$board' WHERE volunteers.volunteer_id = $volunteer_id");
?>

Entry updated.<br/>
<a href="admin.php">Admin Home</a>
</div>
<? include("http://02d2e0a.netsolhost.com/includes/footer.inc");  ?>
</div>
</body>
</html>
<? } ?>












